
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>AOSP源码开发 · GItBook笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="cpucode">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-insert-logo/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="summary.html" />
    
    
    <link rel="prev" href="smart_pointer.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://blog.csdn.net/qq_44226094" target="_blank" class="custom-link">首页</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    目录
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Linux驱动开发</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../linux_driver/character_device_driver.html">
            
                <a href="../linux_driver/character_device_driver.html">
            
                    
                    字符设备驱动开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../linux_driver/linux_driver.html">
            
                <a href="../linux_driver/linux_driver.html">
            
                    
                    Linux驱动开发
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">安卓底层开发</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="hardware_abstraction_layer.html">
            
                <a href="hardware_abstraction_layer.html">
            
                    
                    硬件抽象层
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="smart_pointer.html">
            
                <a href="smart_pointer.html">
            
                    
                    智能指针
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="3.3" data-path="AOSP.html">
            
                <a href="AOSP.html">
            
                    
                    AOSP源码开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="summary.html">
            
                <a href="summary.html">
            
                    
                    Android底层软硬件结合开发概述
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">操作系统</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../operating_system/operat_mechanism.html">
            
                <a href="../operating_system/operat_mechanism.html">
            
                    
                    操作系统的运行机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../operating_system/process.html">
            
                <a href="../operating_system/process.html">
            
                    
                    进程
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">linux一句话</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../linux_in_a_word/network_indepen.html">
            
                <a href="../linux_in_a_word/network_indepen.html">
            
                    
                    与网络无关的Linux
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Linux内核0.12</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../linux_kernel_0_12/computer_composition.html">
            
                <a href="../linux_kernel_0_12/computer_composition.html">
            
                    
                    微型计算机组成结构
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >AOSP源码开发</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <!--
 * @Author: cpu_code
 * @Date: 2020-07-12 15:14:55
 * @LastEditTime: 2020-07-12 21:08:32
 * @FilePath: \note\android_bottom\AOSP.md
 * @Gitee: https://gitee.com/cpu_code
 * @Github: https://github.com/CPU-Code
 * @CSDN: https://blog.csdn.net/qq_44226094
 * @Gitbook: https://923992029.gitbook.io/cpucode/
--> 
<h1 id="aosp&#x6E90;&#x7801;&#x5F00;&#x53D1;">AOSP&#x6E90;&#x7801;&#x5F00;&#x53D1;</h1>
<ul>
<li>@Author: cpu_code</li>
<li>@Date: 2020-07-11 16:18:27</li>
<li>@LastEditTime: 2020-07-12 21:08:41</li>
<li>@FilePath: \note\android_bottom\summary.md</li>
<li>@Gitee: <a href="https://gitee.com/cpu_code" target="_blank">https://gitee.com/cpu_code</a></li>
<li>@Github: <a href="https://github.com/CPU-Code" target="_blank">https://github.com/CPU-Code</a></li>
<li>@CSDN: <a href="https://blog.csdn.net/qq_44226094" target="_blank">https://blog.csdn.net/qq_44226094</a></li>
<li>@Gitbook: <a href="https://923992029.gitbook.io/cpucode/" target="_blank">https://923992029.gitbook.io/cpucode/</a></li>
</ul>
<p>android&#x6E90;&#x7801;&#x4E4B;&#x524D;&#x5206;&#x4E3A;&#x56DB;&#x5C42;  :</p>
<p><img src="https://gitee.com/cpu_code/picture_bed/raw/master//20200712151542.png" alt="Android&#x56DB;&#x5C42;" style="zoom: 150%;"></p>
<p>&#x65B0;&#x7684;android&#x6E90;&#x7801;&#x5206;&#x4E3A;&#x4E94;&#x5C42;&#xFF0C; &#x589E;&#x52A0;&#x4E86;HAL&#x5C42; :</p>
<p><img src="https://gitee.com/cpu_code/picture_bed/raw/master//20200712151605.png" alt="androidw&#x7684;&#x4E94;&#x5C42;" style="zoom: 50%;"></p>
<h2 id="&#x3000;&#x6E90;&#x7801;&#x7EA7;&#x5F00;&#x53D1;&#xFF08;-&#x7CFB;&#x7EDF;&#x5F00;&#x53D1;&#xFF09;">&#x3000;&#x6E90;&#x7801;&#x7EA7;&#x5F00;&#x53D1;&#xFF08; &#x7CFB;&#x7EDF;&#x5F00;&#x53D1;&#xFF09;</h2>
<p>&#x6E90;&#x7801;&#x7EA7;&#x5F00;&#x53D1;&#x5C31;&#x662F;&#x57FA;&#x4E8E;<strong>AOSP</strong>&#xFF08; Android Open Source Project&#xFF09; &#x73AF;&#x5883;&#x7684;&#x5F00;&#x53D1;&#x5DE5;&#x4F5C;&#xFF0C; &#x4E3B;&#x8981;&#x5F00;&#x53D1;&#x573A;&#x666F;&#x4E3A;<strong>Android&#x7CFB;&#x7EDF;&#x5B9A;&#x5236;</strong>&#xFF0C; &#x6BD4;&#x5982;&#x624B;&#x673A;&#x8BBE;&#x5907;&#x7684;MIUI, Flyme&#xFF0C; Smartisan OS,  &#x57FA;&#x4E8E;&#x7535;&#x89C6;&#x7684;LetvUI&#xFF0C; &#x751A;&#x81F3;&#x8FD8;&#x6709;&#x9488;&#x5BF9;&#x6295;&#x5F71;&#x4EEA;&#xFF0C; &#x8DEF;&#x7531;&#x5668;&#x7B49;&#x4F20;&#x7EDF;&#x7269;&#x8054;&#x8BBE;&#x5907;&#x7684;Android&#x7CFB;&#x7EDF;&#x5B9A;&#x5236;&#x5F00;&#x53D1;&#x3002;  </p>
<h3 id="android&#x7CFB;&#x7EDF;&#x5206;&#x5C42;">Android&#x7CFB;&#x7EDF;&#x5206;&#x5C42;</h3>
<p><strong>HAL&#x5C42;</strong>&#xFF1A; &#xFF08; Hardware Abstract Layer&#xFF09; <strong>&#x786C;&#x4EF6;&#x62BD;&#x8C61;&#x5C42;</strong>&#x3002; Android&#x7CFB;&#x7EDF;&#x91CC;&#x5C01;&#x88C5;&#x5185;&#x6838;&#x9A71;&#x52A8;&#x7A0B;&#x5E8F;&#x7684;&#x63A5;&#x53E3;&#x5C42;&#x3002; &#x5BF9;&#x4E0A;&#x5C42;&#x63D0;&#x4F9B;&#x63A5;&#x53E3;&#xFF0C; &#x5C4F;&#x853D;&#x5E95;&#x5C42;&#x9A71;&#x52A8;&#x5B9E;&#x73B0;&#x7EC6;&#x8282;.  </p>
<p>&#x4E3A;&#x4E86;&#x6446;&#x8131; GNU License&#xFF08; &#x5F00;&#x6E90;&#x611F;&#x67D3;&#x6027;&#xFF09; &#xFF0C;Google&#x5C06;Linux&#x5185;&#x6838;&#x4E2D;&#x8DDF;&#x5E95;&#x5C42;&#x786C;&#x4EF6;&#x64CD;&#x4F5C;&#x76F8;&#x5173;&#x7684;&#x903B;&#x8F91;&#x5C01;&#x88C5;&#x6210;HAL&#x5C42;&#x63A5;&#x53E3;&#xFF0C; &#x5382;&#x5546;&#x57FA;&#x4E8E;&#x63A5;&#x53E3;&#x53BB;&#x5B9E;&#x73B0;&#xFF0C; &#x4E0D;&#x76F4;&#x63A5;&#x5728;&#x5185;&#x6838;&#x7A7A;&#x95F4;&#x5B9E;&#x73B0;&#x9A71;&#x52A8;&#x3002; &#x56E0;&#x4E3A;Android&#x7CFB;&#x7EDF;&#x9075;&#x5FAA; Apache License&#xFF0C; &#x4E0D;&#x5F3A;&#x5236;&#x5F00;&#x6E90;&#x3002;  </p>
<h3 id="&#x4E09;&#x65B9;&#x5E94;&#x7528;&#x5F00;&#x53D1;&#x4E0E;&#x6E90;&#x7801;&#x7EA7;&#x5F00;&#x53D1;&#x7684;&#x533A;&#x522B;">&#x4E09;&#x65B9;&#x5E94;&#x7528;&#x5F00;&#x53D1;&#x4E0E;&#x6E90;&#x7801;&#x7EA7;&#x5F00;&#x53D1;&#x7684;&#x533A;&#x522B;</h3>
<p>&#x4E09;&#x65B9;&#x5E94;&#x7528;&#x5F00;&#x53D1;&#x662F;&#x57FA;&#x4E8E;<strong>Android SDK&#x5F00;&#x53D1;</strong>&#x3002; &#x4E3B;&#x8981;&#x6280;&#x672F;&#x65B9;&#x5411;&#x4E3A;<strong>APP</strong>&#x53CA;<strong>&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;</strong>&#xFF0C; &#x6570;&#x636E;&#x5E93;&#xFF0C; &#x7F51;&#x7EDC;&#x534F;&#x8BAE;&#xFF0C; &#x5E94;&#x7528;&#x67B6;&#x6784;&#x7B49;&#xFF0C; &#x670D;&#x52A1;&#x4E8E;&#x5546;&#x4E1A;APP&#x9700;&#x6C42;&#x3002;  </p>
<p>&#x6E90;&#x7801;&#x7EA7;&#x5F00;&#x53D1;&#x662F;&#x57FA;&#x4E8E;<strong>AOSP&#x73AF;&#x5883;&#x5F00;&#x53D1;</strong>&#xFF0C; &#x4E3B;&#x8981;&#x6280;&#x672F;&#x65B9;&#x5411;&#x4E3A;<strong>&#x7CFB;&#x7EDF;&#x5E94;&#x7528;&#x5F00;&#x53D1;</strong>&#xFF0C; Framework&#x5F00;&#x53D1;&#xFF0C; &#x5E95;&#x5C42;&#x6D4F;&#x89C8;&#x5668;&#x5185;&#x6838;&#x5F00;&#x53D1;&#xFF0C; &#x97F3;&#x89C6;&#x9891;&#x7F16;&#x89E3;&#x7801;&#x5F00;&#x53D1;&#xFF0C; &#x865A;&#x62DF;&#x673A;&#x5F00;&#x53D1;&#xFF0C; &#x5E95;&#x5C42;&#x9A71;&#x52A8;&#x5F00;&#x53D1;&#x7B49;&#x3002; &#x670D;&#x52A1;&#x4E8E;&#x7CFB;&#x7EDF;&#x5B9A;&#x5236;&#x9700;&#x6C42;&#x3002;  </p>
<h3 id="aosp&#x5B98;&#x7F51;">AOSP&#x5B98;&#x7F51;</h3>
<p>AOSP&#x5B98;&#x7F51;&#x63D0;&#x4F9B;&#x7CFB;&#x7EDF;&#x5F00;&#x53D1;&#x76F8;&#x5173;&#x6307;&#x5BFC;&#xFF0C; &#x6BD4;&#x5982;&#x6E90;&#x7801;&#x7684;&#x73AF;&#x5883;&#x642D;&#x5EFA;&#xFF0C; &#x4E0B;&#x8F7D;&#xFF0C; &#x7F16;&#x8BD1;&#xFF0C; &#x7EF4;&#x62A4;&#xFF0C; &#x66F4;&#x65B0;&#x7248;&#x672C;&#xFF0C; &#x5F00;&#x653E;&#x9A71;&#x52A8;&#x7684;&#x4E0B;&#x8F7D;&#x7B49;  </p>
<p><a href="https://source.android.google.cn/" target="_blank">https://source.android.google.cn/</a></p>
<hr>
<h2 id="ubuntu&#x7CFB;&#x7EDF;&#x5B89;&#x88C5;&#x4E0E;&#x4ECB;&#x7ECD;">Ubuntu&#x7CFB;&#x7EDF;&#x5B89;&#x88C5;&#x4E0E;&#x4ECB;&#x7ECD;</h2>
<p>AOSP&#x73AF;&#x5883;&#x8981;&#x6C42;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x4E3A;Linux&#x6216;&#x8005;Mac OS&#x3002; </p>
<p>&#x5982;&#x679C;&#x60F3;&#x5728;Window&#x4E0B;&#x8FDB;&#x884C;AOSP&#x5F00;&#x53D1;&#xFF0C; &#x901A;&#x8FC7;&#x901A;&#x8FC7;&#x865A;&#x62DF;&#x673A;&#x8F6F;&#x4EF6;&#x5B89;&#x88C5;&#x4E00;&#x4E2A;Linux&#x7CFB;&#x7EDF;&#xFF0C; &#x6BD4;&#x5982;Ubuntu&#x6216;CentOS&#x3002; </p>
<h3 id="&#x5B89;&#x88C5;&#x865A;&#x62DF;&#x673A;">&#x5B89;&#x88C5;&#x865A;&#x62DF;&#x673A;</h3>
<p>VirtualBox   ,  VMWare  </p>
<h3 id="ubuntu&#x7CFB;&#x7EDF;&#x7684;&#x5B89;&#x88C5;&#x4E0E;&#x4ECB;&#x7ECD;">Ubuntu&#x7CFB;&#x7EDF;&#x7684;&#x5B89;&#x88C5;&#x4E0E;&#x4ECB;&#x7ECD;</h3>
<p>Ubuntu&#x7CFB;&#x7EDF;&#x662F;&#x5F00;&#x53D1;&#x4F7F;&#x7528;&#x6BD4;&#x8F83;&#x5E7F;&#x6CDB;&#x7684;&#x4E00;&#x4E2A;Linux&#x53D1;&#x884C;&#x7248; ,  &#x5E26;LTS&#xFF08; Long Term Support&#xFF09; &#xFF0C; &#x4EE3;&#x8868;&#x662F;&#x5B98;&#x65B9;&#x957F;&#x671F;&#x7EF4;&#x62A4;&#x7684;&#x7248;&#x672C;  </p>
<hr>
<h2 id="&#x5E38;&#x89C1;linux&#x547D;&#x4EE4;">&#x5E38;&#x89C1;Linux&#x547D;&#x4EE4;</h2>
<p>Linux&#x547D;&#x4EE4;&#x662F;&#x5BF9;Linux&#x7CFB;&#x7EDF;&#x8FDB;&#x884C;&#x7BA1;&#x7406;&#x7684;&#x547D;&#x4EE4;&#x3002; &#x5BF9;&#x4E8E;Linux&#x7CFB;&#x7EDF;&#x6765;&#x8BF4;&#xFF0C; &#x65E0;&#x8BBA;&#x662F;&#x4E2D;&#x592E;&#x5904;&#x7406;&#x5668;&#x3001; &#x5185;&#x5B58;&#x3001;&#x78C1;&#x76D8;&#x9A71;&#x52A8;&#x5668;&#x3001; &#x952E;&#x76D8;&#x3001; &#x9F20;&#x6807;&#xFF0C; &#x8FD8;&#x662F;&#x7528;&#x6237;&#x7B49;&#x90FD;&#x662F;&#x6587;&#x4EF6;&#x3002; &#x547D;&#x4EE4;&#x5C31;&#x662F;&#x53BB;&#x64CD;&#x4F5C;&#x6587;&#x4EF6;&#xFF0C; &#x4EE5;&#x8FBE;&#x5230;&#x7BA1;&#x7406;&#x7CFB;&#x7EDF;&#x7684;&#x76EE;&#x7684;&#x3002;</p>
<p>Linux&#x5305;&#x542B;&#x7CFB;&#x7EDF;&#x5185;&#x7F6E;<strong>shell</strong>&#x547D;&#x4EE4;&#xFF08; &#x5982; <code>cd</code>&#xFF09; &#x53CA;&#x5B89;&#x88C5;&#x7684;<strong>&#x5176;&#x4ED6;Linux&#x547D;&#x4EE4;</strong>&#xFF08; &#x5982; <code>git</code>&#xFF09; &#x3002;</p>
<p>&#x76F8;&#x6BD4;Window&#x7CFB;&#x7EDF;&#x7684;&#x5F3A;&#x9879;-&#x56FE;&#x5F62;&#x5316;&#xFF0C; Linux&#x7684;&#x547D;&#x4EE4;&#x5219;&#x662F;&#x5B83;&#x7684;&#x5F3A;&#x9879;&#x3002; &#x719F;&#x7EC3;&#x638C;&#x63E1;&#x5E38;&#x89C1;Linux&#x547D;&#x4EE4;&#xFF0C; &#x662F;&#x505A;Linux&#x73AF;&#x5883;&#x4E0B;&#x5F00;&#x53D1;&#x7684;&#x57FA;&#x672C;&#x6280;&#x80FD;&#x3002;</p>
<p>PS&#xFF1A; Linux&#x547D;&#x4EE4;&#x5927;&#x90E8;&#x5206;&#x5728;<strong>Mac OS</strong> &#x4E0B;&#x4E5F;&#x662F;&#x901A;&#x7528;&#x7684;&#xFF0C; &#x5B83;&#x4EEC;&#x90FD;&#x5C5E;&#x4E8E;<strong>&#x7C7B;Unix&#x7CFB;&#x7EDF;</strong>&#x3002;  </p>
<h3 id="&#x76EE;&#x5F55;&#x64CD;&#x4F5C;">&#x76EE;&#x5F55;&#x64CD;&#x4F5C;</h3>
<pre><code class="lang-shell"># &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x8DEF;&#x5F84;
pwd
</code></pre>
<pre><code class="lang-shell"># &#x67E5;&#x770B;&#x6587;&#x4EF6;&#x5217;&#x8868; eg: ls dirname
ls
</code></pre>
<pre><code class="lang-shell"># &#x67E5;&#x770B;&#x6240;&#x6709;&#x6587;&#x4EF6;&#xFF0C; &#x5305;&#x62EC;&#x9690;&#x85CF;&#x6587;&#x4EF6;
-a
</code></pre>
<pre><code class="lang-shell"># &#x67E5;&#x770B;&#x6587;&#x4EF6;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;
-l
</code></pre>
<pre><code class="lang-shell"># &#x4EE3;&#x8868;&#x5F53;&#x524D;&#x76EE;&#x5F55;
.
</code></pre>
<pre><code class="lang-shell"># &#x4EE3;&#x8868;&#x4E0A;&#x4E00;&#x7EA7;&#x76EE;&#x5F55;
..
</code></pre>
<pre><code class="lang-shell"># &#x8FDB;&#x5165;&#x67D0;&#x4E00;&#x4E2A;&#x76EE;&#x5F55; eg: cd dirname
cd
</code></pre>
<pre><code class="lang-shell"># &#x8FDB;&#x5165;&#x4E0A;&#x4E00;&#x7EA7;&#x76EE;&#x5F55;
cd ..
</code></pre>
<pre><code class="lang-shell"># &#x8FDB;&#x5165;&#x4E0A;&#x6B21;&#x6240;&#x5728;&#x76EE;&#x5F55;
cd -
</code></pre>
<pre><code class="lang-shell"># &#x521B;&#x5EFA;&#x76EE;&#x5F55;
mkdir
</code></pre>
<pre><code class="lang-shell"># &#x521B;&#x5EFA;&#x591A;&#x7EA7;&#x76EE;&#x5F55;
-p
</code></pre>
<pre><code class="lang-shell"># &#x62F7;&#x8D1D;&#x6587;&#x4EF6;&#x6216;&#x8005;&#x76EE;&#x5F55; eg: cp src1 src2... dest
cp
</code></pre>
<pre><code class="lang-shell">#  &#x62F7;&#x8D1D;&#x76EE;&#x5F55; eg: cp -r src dest
-r
</code></pre>
<pre><code class="lang-shell"># &#x79FB;&#x52A8;&#x6587;&#x4EF6;&#x6216;&#x8005;&#x76EE;&#x5F55; eg:mv src dest (&#x5982;&#x679C;srcfile&#x548C;destfile&#x5728;&#x540C;&#x4E00;&#x76EE;&#x5F55;&#x4E0B;&#xFF0C; &#x5C31;&#x662F;&#x91CD;&#x547D;&#x540D;&#x7684;&#x6548;&#x679C;)
mv
</code></pre>
<pre><code class="lang-shell"># &#x5220;&#x9664;&#x6587;&#x4EF6; eg: rm filename1 filename2 ...
rm
</code></pre>
<pre><code class="lang-shell"># &#x5220;&#x9664;&#x76EE;&#x5F55; eg: rm -r dirname
-r
</code></pre>
<h3 id="&#x6587;&#x4EF6;&#x67E5;&#x627E;">&#x6587;&#x4EF6;&#x67E5;&#x627E;</h3>
<pre><code class="lang-shell"># &#x67E5;&#x627E;&#x67D0;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#xFF0C; find [path] -name &lt;filename&gt;
find
</code></pre>
<pre><code class="lang-shell"># &#x4ECE;&#x67D0;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;/&#x76EE;&#x5F55;&#x4E0B;&#x6240;&#x6709;&#x6587;&#x4EF6; &#x4E2D;&#x5339;&#x914D;&#x5B57;&#x7B26;&#x4E32;&#xFF0C; grep [-r -n ]&lt;string&gt; path
grep
</code></pre>
<pre><code class="lang-shell"># &#x904D;&#x5386;&#x76EE;&#x5F55;&#x67E5;&#x627E;
-r
</code></pre>
<pre><code class="lang-shell"># &#x663E;&#x793A;&#x884C;&#x53F7;
-n
</code></pre>
<h3 id="&#x7CFB;&#x7EDF;&#x64CD;&#x4F5C;">&#x7CFB;&#x7EDF;&#x64CD;&#x4F5C;</h3>
<pre><code class="lang-shell"># &#x5207;&#x6362;&#x5230;&#x67D0;&#x4E00;&#x4E2A;&#x7528;&#x6237;(&#x9700;&#x8981;&#x8F93;&#x5165;&#x8981;&#x5207;&#x6362;&#x7684;&#x7528;&#x6237;&#x7684;&#x5BC6;&#x7801;) eg: su username
su
</code></pre>
<pre><code class="lang-shell"># &#x975E;root&#x7528;&#x6237;&#x5F3A;&#x5236;&#x6267;&#x884C;&#x4E00;&#x4E9B;&#x9700;&#x8981;root&#x6743;&#x9650;&#x7684;&#x64CD;&#x4F5C;(&#x9700;&#x8981;&#x8F93;&#x5165;&#x5F53;&#x524D;&#x7528;&#x6237;&#x7684;&#x5BC6;&#x7801;) eg: sudo rm filename
sudo
</code></pre>
<pre><code class="lang-shell"># Ubuntu&#x7684;&#x8F6F;&#x4EF6;&#x7BA1;&#x5BB6;&#xFF0C; &#x8FDB;&#x884C;&#x8F6F;&#x4EF6;&#x7684;&#x66F4;&#x65B0;&#xFF0C; &#x5378;&#x8F7D;&#x4E0E;&#x7EF4;&#x62A4;&#x3002;
apt-get
</code></pre>
<pre><code class="lang-shell"># &#x7EC8;&#x7AEF;&#x4E0B;&#x7684;&#x6587;&#x672C;&#x7F16;&#x8F91;&#x5668;&#x3002;
vim
</code></pre>
<pre><code class="lang-shell"># &#x8FDB;&#x5165;&#x7F16;&#x8F91;&#x6A21;&#x5F0F;
i
</code></pre>
<pre><code class="lang-shell">#  &#x8DF3;&#x5230;&#x547D;&#x4EE4;&#x6A21;&#x5F0F;
ESC
</code></pre>
<pre><code class="lang-shell"># &#x5220;&#x9664;&#x4E00;&#x884C;
dd
</code></pre>
<pre><code class="lang-shell"># &#x4FDD;&#x5B58;&#x9000;&#x51FA;
:wq
</code></pre>
<pre><code class="lang-shell"># &#x4E0D;&#x4FDD;&#x5B58;&#x9000;&#x51FA;
:q!
</code></pre>
<pre><code class="lang-shell"># &#x67E5;&#x770B;&#x6587;&#x4EF6;,&#x5C06;&#x6587;&#x672C;&#x5185;&#x5BB9;&#x6253;&#x5370;&#x5230;&#x63A7;&#x5236;&#x53F0;&#x3002;
cat
</code></pre>
<h3 id="vim">vim</h3>
<pre><code class="lang-shell"># &#x5B89;&#x88C5;VIM
sudo apt-get install vim

# &#x5378;&#x8F7D;VIM
sudo apt-get remove vim

# &#x66F4;&#x65B0;&#x5230;&#x6700;&#x65B0;&#x8F6F;&#x4EF6;&#x5217;&#x8868;
sudo apt-get update
</code></pre>
<h3 id="chmod">chmod</h3>
<pre><code class="lang-shell"># &#x4FEE;&#x6539;&#x6587;&#x4EF6;&#x6743;&#x9650;&#xFF0C; eg&#xFF1A; chmod a+x xxx.sh chmod 777 xxx.sh
# &#x6743;&#x9650;&#x8BBE;&#x5B9A;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x5B57;&#x4E32;[ugoa][+-=][rwx]&#x6216;&#x8005;&#x6570;&#x5B57; (r=4,w=2,x=1,-=0)&#xFF0C;
# u &#x62E5;&#x6709;&#x8005;
# g &#x7528;&#x6237;&#x7EC4;
# o &#x5176;&#x4ED6;&#x7528;&#x6237;
# a &#x6240;&#x6709;&#x4EBA;
# + &#x8868;&#x793A;&#x589E;&#x52A0;&#x6743;&#x9650;
# - &#x8868;&#x793A;&#x53D6;&#x6D88;&#x6743;&#x9650;
# = &#x8868;&#x793A;&#x76F4;&#x63A5;&#x6307;&#x5B9A;&#x6743;&#x9650;
chmod
</code></pre>
<h2 id="aosp&#x6E90;&#x7801;&#x5DE5;&#x4F5C;&#x73AF;&#x5883;">AOSP&#x6E90;&#x7801;&#x5DE5;&#x4F5C;&#x73AF;&#x5883;</h2>
<p>&#x6E90;&#x7801;&#x5DE5;&#x4F5C;&#x73AF;&#x5883;&#xFF0C; &#x5C31;&#x662F;&#x5B89;&#x88C5;&#x6240;&#x4F9D;&#x8D56;&#x7684;&#x4E00;&#x4E9B;&#x8F6F;&#x4EF6;&#x5E93;&#xFF0C; &#x4EE5;&#x53CA;&#x5F00;&#x53D1;&#x8C03;&#x8BD5;&#x65F6;&#x9700;&#x8981;&#x8FDB;&#x884C;&#x7684;&#x4E00;&#x4E9B;&#x914D;&#x7F6E;&#x3002; &#x4E3B;&#x8981;&#x5206;&#x4E3A;&#x7F16;&#x8BD1;&#x73AF;&#x5883;&#x51C6;&#x5907;&#xFF0C; AOSP&#x6E90;&#x7801;&#x4E0B;&#x8F7D;&#xFF0C; &#x6E90;&#x7801;&#x9884;&#x7F16;&#x8BD1;&#x7B49;&#x3002; &#x8FD9;&#x91CC;&#x4E3B;&#x8981;&#x4ECB;&#x7ECD;&#x5728;Ubuntu14.04 LTS&#x4E0B;&#x5F00;&#x53D1;Android6.0&#x4EE3;&#x7801;&#x7684;&#x5DE5;&#x4F5C;&#x73AF;&#x5883;&#x51C6;&#x5907;&#x3002;  </p>
<h3 id="&#x7F16;&#x8BD1;&#x73AF;&#x5883;&#x642D;&#x5EFA;&#xFF08;-ubuntu1404&#xFF09;">&#x7F16;&#x8BD1;&#x73AF;&#x5883;&#x642D;&#x5EFA;&#xFF08; Ubuntu14.04&#xFF09;</h3>
<p>JDK&#x548C;&#x4F9D;&#x8D56;&#x5305;&#x4E0B;&#x8F7D;</p>
<pre><code class="lang-shell">#&#x83B7;&#x53D6;&#x6E90;&#x7684;&#x66F4;&#x65B0;
sudo apt-get update 

#&#x4E0B;&#x8F7D;openjdk7
sudo apt-get install openjdk-7-jdk
</code></pre>
<p>sunjdk &#x91C7;&#x7528;Java&#x7814;&#x7A76;&#x8BB8;&#x53EF;&#xFF08; Java Research License&#xFF0C; &#x7B80;&#x79F0;JRL&#xFF09; &#x8BB8;&#x53EF;&#x8BC1;&#x4E66;&#xFF0C; &#x90E8;&#x5206;&#x5F00;&#x6E90;&#xFF0C; &#x4EC5;&#x9650;&#x7814;&#x7A76;&#x3002; openjdk&#x91C7;&#x7528;GNU&#x8BB8;&#x53EF;&#x8BC1;&#x4E66;&#xFF0C; &#x5B8C;&#x5168;&#x5F00;&#x6E90;&#x3002; sunjdk&#x4E2D;&#x79C1;&#x6709;APIs&#x7528;&#x7C7B;&#x4F3C;&#x529F;&#x80FD;&#x7684;&#x5F00;&#x6E90;&#x4EE3;&#x7801;&#x66FF;&#x6362;/&#x91CD;&#x65B0;&#x5B9E;&#x73B0;&#x3002;   </p>
<p>&#x5B89;&#x88C5;&#x5176;&#x4ED6;&#x4F9D;&#x8D56;  </p>
<pre><code class="lang-shell">sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g -dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx 11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip
</code></pre>
<p>USB&#x8BBE;&#x5907;&#x6743;&#x9650;&#x914D;&#x7F6E;  </p>
<p>&#x4EE5;root&#x8EAB;&#x4EFD;&#x5728;/etc/udev/rules.d/ &#x76EE;&#x5F55;&#x4E0B;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;rules&#x89C4;&#x5219;&#x6587;&#x4EF6;&#xFF0C; AOSP&#x63D0;&#x4F9B;&#x7684;rules&#x91CC;&#x914D;&#x7F6E;&#x4E86;&#x5E38;&#x89C1;Android&#x8BBE;&#x5907;  </p>
<pre><code class="lang-shell"># &#x4E0B;&#x8F7D;&#x5E76;&#x914D;&#x7F6E;AOSP&#x7684;usb&#x8BBE;&#x5907;&#x6743;&#x9650;&#x89C4;&#x5219;&#x6A21;&#x677F;
wget -S -O - [http://source.android.com/source/51-android.rules](http://source.andro id.com/source/51-android.rules) | sed &quot;s/&lt;username&gt;/$USER/&quot; | sudo tee &gt;/dev/null /etc /udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
</code></pre>
<p>&#x6267;&#x884C;adb devices&#x7684;&#x65F6;&#x5019;&#x53EF;&#x80FD;&#x4F1A;&#x63D0;&#x793A;permission denied&#xFF0C; &#x539F;&#x56E0;&#x5C31;&#x662F;&#x56E0;&#x4E3A;&#x81EA;&#x5DF1;&#x7684;Android&#x8BBE;&#x5907;&#x6CA1;&#x6709;&#x52A0;&#x5165;&#x5230;&#x8FD9;&#x4E2A;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x5F53;&#x4E2D;  </p>
<pre><code class="lang-shell"># &#x5217;&#x51FA;&#x5F53;&#x524D;&#x7CFB;&#x7EDF;&#x8BC6;&#x522B;&#x5230;&#x7684;USB&#x8BBE;&#x5907;
lsusb
</code></pre>
<p>&#x5047;&#x8BBE;&#x51FA;&#x73B0;</p>
<pre><code class="lang-shell">Bus 001 Device 007: ID 0403:cb48 Future Technology Devices International, Ltd
</code></pre>
<p>idVendor&#x662F;0403,  idProduct&#x662F;cb48  </p>
<p>51-android.rules  </p>
<pre><code class="lang-shell">SUBSYSTEM==&quot;usb&quot;, ATTR{idVendor}==&quot;0403&quot;, ATTR{idProduct}==&quot;cb48&quot;, MODE=&quot;0600&quot;, OWNER=&quot;&lt;username&gt;&quot;
</code></pre>
<h3 id="&#x6E90;&#x7801;&#x4E0B;&#x8F7D;&#x4E0E;&#x7BA1;&#x7406;">&#x6E90;&#x7801;&#x4E0B;&#x8F7D;&#x4E0E;&#x7BA1;&#x7406;</h3>
<h3 id="&#x6E90;&#x7801;&#x9884;&#x7F16;&#x8BD1;">&#x6E90;&#x7801;&#x9884;&#x7F16;&#x8BD1;</h3>
<h3 id="&#x77E5;&#x8BC6;&#x6269;&#x5C55;">&#x77E5;&#x8BC6;&#x6269;&#x5C55;</h3>
<h3 id="aosp&#x5E38;&#x89C1;&#x7684;&#x547D;&#x4EE4;&#xFF0C;-&#x76EE;&#x5F55;&#x4ECB;&#x7ECD;">AOSP&#x5E38;&#x89C1;&#x7684;&#x547D;&#x4EE4;&#xFF0C; &#x76EE;&#x5F55;&#x4ECB;&#x7ECD;</h3>
<h2 id="android-build-system&#x5165;&#x95E8;">Android Build System&#x5165;&#x95E8;</h2>
<h3 id="&#x4EC0;&#x4E48;&#x662F;makefile">&#x4EC0;&#x4E48;&#x662F;makefile</h3>
<h3 id="abs&#x7684;&#x5DE5;&#x4F5C;&#x6D41;&#x7A0B;">ABS&#x7684;&#x5DE5;&#x4F5C;&#x6D41;&#x7A0B;</h3>
<h2 id="aosp&#x4E0B;&#x8FDB;&#x884C;&#x7CFB;&#x7EDF;&#x5F00;&#x53D1;">AOSP&#x4E0B;&#x8FDB;&#x884C;&#x7CFB;&#x7EDF;&#x5F00;&#x53D1;</h2>
<h3 id="android&#x7684;&#x542F;&#x52A8;&#x6D41;&#x7A0B;&#x7B80;&#x8FF0;">Android&#x7684;&#x542F;&#x52A8;&#x6D41;&#x7A0B;&#x7B80;&#x8FF0;</h3>
<h3 id="&#x4FEE;&#x6539;&#x7CFB;&#x7EDF;app&#x4EE3;&#x7801;">&#x4FEE;&#x6539;&#x7CFB;&#x7EDF;APP&#x4EE3;&#x7801;</h3>
<h3 id="&#x5B9A;&#x5236;framework">&#x5B9A;&#x5236;framework</h3>
<h3 id="&#x8FDB;&#x4E00;&#x6B65;&#x4FEE;&#x6539;native&#x5C42;&#x7684;&#x4EE3;&#x7801;">&#x8FDB;&#x4E00;&#x6B65;&#x4FEE;&#x6539;native&#x5C42;&#x7684;&#x4EE3;&#x7801;</h3>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; dsx2016.com 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x7AE0;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-07-12 21:08:55
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="smart_pointer.html" class="navigation navigation-prev " aria-label="Previous page: 智能指针">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="summary.html" class="navigation navigation-next " aria-label="Next page: Android底层软硬件结合开发概述">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"AOSP源码开发","level":"3.3","depth":1,"next":{"title":"Android底层软硬件结合开发概述","level":"3.4","depth":1,"path":"android_bottom/summary.md","ref":"android_bottom/summary.md","articles":[]},"previous":{"title":"智能指针","level":"3.2","depth":1,"path":"android_bottom/smart_pointer.md","ref":"android_bottom/smart_pointer.md","articles":[]},"dir":"ltr"},"config":{"plugins":["back-to-top-button","chapter-fold","code","splitter","-lunr","-search","search-pro","insert-logo","custom-favicon","pageview-count","tbfed-pagefooter","popup","-sharing","sharing-plus","livereload"],"root":".","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy dsx2016.com 2019","modify_label":"该文章修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"livereload":{},"splitter":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"favicon":"./icon/book.ico","back-to-top-button":{},"pageview-count":{},"custom-favicon":{},"sharing":{"qq":true,"all":["douban","facebook","google","instapaper","linkedin","twitter","weibo","messenger","qq","qzone","viber","whatsapp"],"douban":true,"facebook":true,"weibo":true,"twitter":true,"pocket":true,"google":true,"qzone":true},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"insert-logo":{"style":"background: none; max-height: 30px; min-height: 30px","url":"https://s1.ax1x.com/2020/06/18/Nnpxmj.png"}},"theme":"default","author":"cpucode","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GItBook笔记","language":"zh-hans","output.name":"site","links":{"sidebar":{"首页":"https://blog.csdn.net/qq_44226094"}},"gitbook":"3.2.3","description":"GitBook笔记"},"file":{"path":"android_bottom/AOSP.md","mtime":"2020-07-12T13:08:55.386Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-15T02:25:37.570Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-insert-logo/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

